<#assign s=JspTaglibs["/WEB-INF/tld/struts-tags.tld"] />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<#import "/WEB-INF/tpl/public/ListHead.ftl" as lHead>  
	<@lHead.ListHead title="部门管理">
<script type="text/javascript">
jQuery(function($){
	jQuery("#datagrid").jqGrid({
		treeGrid: true,
		treeGridModel: 'adjacency',
		ExpandColumn : 'department_name',
	    url:'listTbDepartmentAsStartPrior.action?department.valid_flag=1',  
	    mtype: "POST",
	    datatype: "json",
	    colNames:['部门名称', '上级部门名称', '创建时间', '修改时间'],
	    colModel:[
	       {name:'department_name',index:'department_name'},
	       {name:'parent_name',index:'parent_name'},
	       {name:'create_time',index:'create_time'},
	       {name:'modify_time',index:'modify_time'}
	    ],
	    pager: false,
	    rowNum:10,
	    viewrecords: true,
	    caption: "部门列表",
	    autowidth: true,
	    height: '100%',
	    ondblClickRow: function(rowid){searchUser(rowid);}
	});
});


function loadDep(rowid) {
	showMDialog('loadDep.action?depId='+rowid,'dialogWidth=850px;dialogHeight=600px');
}
function gridReload(){ 	 
	jQuery("#datagrid").trigger("reloadGrid");
}
</script>
</@lHead.ListHead> 
<body>
<div class="content">
<#import "/WEB-INF/tpl/public/ListTop.ftl" as top>  
	<@top.top title="系统管理->部门管理" >
	<div class="action-button"><input type="button" onclick="showMDialog('../department/addDep.action','dialogWidth=1000px;dialogHeight=600px');" value="新增"/></div>
	</@top.top> 
	
<#import "/WEB-INF/tpl/public/err.ftl" as err>  
	<@err.errmessage>
	</@err.errmessage> 

<#import "/WEB-INF/tpl/public/listTable.ftl" as list>  
	<@list.listTable>
	</@list.listTable> 

</div>
</body>
</html>